package com.ptu.spzx.domain.Exam;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ptu.spzx.domain.Exam.vo.SimpleExampaperQuestionVo;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author YT
 * @since 2024-01-28
 */
@Data
//MyBatis 是否自动映射查询结果到 Map 类型的对象
@TableName(value = "exampaper", autoResultMap = true)
public class Exampaper implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 试卷编号
     */
    @TableId(value = "ep_id", type = IdType.AUTO)
    private Long epId;

    /**
     * 所属课程编号
     */
    private Integer belongCourseId;

    /**
     * 试卷名称
     */
    private String epName;

    /**
     * 试卷分数
     */
    private Float epScore;

    /**
     * 合格分数
     */

    private Float qualifyScore;
    /**
     * 试卷问题数量
     */
    private Integer epQuestionNumber;

    /**
     * 试卷答案
     */
    @TableField(typeHandler = JacksonTypeHandler.class, updateStrategy = FieldStrategy.IGNORED)
    private List<SimpleExampaperQuestionVo> epAnswer;

    /**
     * 是否公共
     */
    private Integer epIsPublic;

    /**
     * 创建者
     */
    @TableField(fill = FieldFill.INSERT)
    private String creator;

    /**
     * 更新者
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updater;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    private Integer isAuto;
    /**
     * 是否删除
     */
    @JsonIgnore
    @TableLogic
    private Boolean isDelete;


}
